About 501 letters

About 3 minutes

#oct

Description: Convert an integer to an octal string prefixed with 0o.

def oct(x: int): ''' Convert an integer to an octal string with prefix `0o` :param x: An integer :return: The octal string representation of x '''

Example:

print(oct(0)) print(oct(10)) print(oct(1024))

>>> Establishing WebAssembly Runtime.

>>> Standby.

Powered by Shift.

Created in 6/9/2025

Updated in 6/9/2025